package Book;

public class Book {
    private String id;
    private String name;
    private String author;
    private int price;
    private String press;
    private boolean isBorrowed = false;//默认未被借出

    public Book(String id,String name, String author, int price, String press) {
        this.id = id;
        this.name = name;
        this.author = author;
        this.price = price;
        this.press = press;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public String getType() {
        return press;
    }

    public void setType(String type) {
        type = type;
    }

    public boolean isBorrowed() {
        return isBorrowed;
    }

    public void setBorrowed(boolean borrowed) {
        isBorrowed = borrowed;
    }

    @Override
    public String toString() {
        return "book{" +
                "id='"+ id +'\''+
                "，name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", price=" + price +
                ", Type='" + press + '\'' +
                ", 是否被借出：" + isBorrowed +
                '}';
    }
}
